{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
}}

<div class="has-text-right">
  <Hds::Dropdown @isInline={{true}} @listPosition="bottom-right" as |dd|>
    <dd.ToggleIcon @icon="more-horizontal" @text="Metadata options" @hasChevron={{false}} data-test-popup-menu-trigger />
    <dd.Interactive @color="critical" {{on "click" (fn (mut this.showConfirmModal) true)}}>Remove</dd.Interactive>
  </Hds::Dropdown>
</div>

{{#if this.showConfirmModal}}
  <ConfirmModal
    @color="critical"
    @onClose={{fn (mut this.showConfirmModal) false}}
    @onConfirm={{this.removeMetadata}}
    @confirmTitle="Remove metadata?"
    @confirmMessage="This data may be used outside of Vault."
  />
{{/if}}